#pragma once

#include <rtthread.h>
#include <rtdevice.h>

#define STATION_UART_NAME "uart2"
#define STATION_UART_HZ 115200

class robot_driver
{
public:
    robot_driver(){};
    robot_driver(const char* name);
    virtual ~robot_driver();
    virtual void open() = 0;
    virtual int read(int pos, void *buffer,int size);
    virtual int write(int pos, const void *buffer,int size);

    rt_device_t hw_handle;

protected:
    char name[8];
};
